/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2022-06-11     ChinaGhost       the first version
 */
#ifndef APPLICATIONS_INC_KINETIC_CONTROL_H_
#define APPLICATIONS_INC_KINETIC_ANALYSIS_H_

#include <rtthread.h>
#include <rtdevice.h>
#include "../inc/includes.h"
#include "sensor_inven_mpu6xxx.h"
/*
 * 麦轮轮子编号
 *     |2     |1
 *
 *
 *     |3     |4
 * */


#define DIS_A 10  //底盘中心距离麦轮的x距离
#define DIS_B 10  //底盘距离重心麦轮的y距离


int v2encoder(float v);     //速度转换成编码器的转换指
rt_err_t control_init(void);      //初始化
void kinetic_calc(float x,float y,float z,float f_out[4]); //运动学动力分配解算
void kinetic_control(void *parm);      //运动控制线程
void update_newvalue_thread(void *parm);    //更新参数线程
void mpu_handler(void *parm);               //陀螺仪数据处理

#endif /* APPLICATIONS_INC_KINETIC_CONTROL_H_ */
